<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="layout">
<head>
    <title>用户组管理</title>
</head>
<body>
<!--<h1 layout:fragment="header">Messages : View all</h1>-->
<div layout:fragment="content">
    <div class="box-header with-border">
        <h3 class="box-title">用户组管理</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" role="from">
        <div class="box-body">
            <div class="form-group col-md-3">
                <label for="search_value" class="col-sm-4 control-label">用户组</label>

                <div class="col-xs-8 no-padding">
                    <input type="text" id="search_value" class="form-control" placeholder="用户组" name="search_value">
                </div>
            </div>

            <div class="form-group col-md-3 right-button">
                <button onclick="searchGroupBtn()" type="button" class="btn btn-danger right-button">查询</button>
                <button onclick="addGroupBtn()" type="button" class="btn btn-success right-button">添加</button>
            </div>
        </div>
    </form>
    <div class="box-body">
        <table id="roleGroup" class="table table-bordered table-striped">
            <thead>
            <tr>
                <th>序号</th>
                <th>用户组名</th>
                <th>组描述</th>
                <th>修改时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div class="modal" id="GroupModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title" style="font-size:18px;">用户组添加</h3>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="addGroupFrom">
                        <div class="box-body">
                            <div class="form-group">
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_Group" class="col-sm-4 control-label">用户组名</label>

                                        <div class="col-sm-8">
                                            <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                                            <input type="text" class="form-control" id="add_Group" data-rule="required(用户组名必须填写)" name="roleName" placeholder="用户组名">
                                            <input type="hidden" id="id" name="id">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-sm-6">
                                    <div class="form-group">
                                        <label for="add_GroupDes" class="col-sm-5 control-label">用户组描述</label>
                                        <div class="col-sm-7">
                                            <input type="text" class="form-control" id="add_GroupDes" name="roleDescribe" data-rule-maxlength="20" placeholder="用户组描述">
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="form-group">
                                <label for="edit_Res" id="edit_Res2" class="col-sm-2 control-label">菜单权限</label>
                                <button id="edit_Res" onclick="editResBtn()" type="button" class="btn btn-danger right-button">编辑权限</button>
                                <!--<label for="add_type" class="col-sm-2 control-label">类型</label>-->

                                <!--<div class="col-sm-10">-->
                                    <!--<select id="add_type" class="form-control" name="type">-->
                                        <!--<option value="1">高校</option>-->
                                        <!--<option value="2">部门</option>-->
                                        <!--<option value="3">职务</option>-->
                                    <!--</select>-->
                                <!--</div>-->
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-primary" onclick="groupmodal_sub()">
                        确认
                    </button>
                    <button class="btn btn-warning" data-dismiss="modal">退出</button>
                </div>
            </div>
        </div><!-- /.modal -->
    </div>
    <div class="modal" id="ResModal">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h3 class="modal-title">权限添加</h3>
                </div>
                <div class="modal-body">
                    <form class="form-horizontal" id="editResFrom">
                        <div class="box-body">
                            <label class="checkbox">
                                <input type="checkbox" name="ch_box" value="1"> 属性管理
                            </label>
                            <label class="checkbox">
                                <input type="checkbox" name="ch_box" value="2"> 客户管理
                            </label>
                            <label class="checkbox">
                                <input type="checkbox" name="ch_box" value="3"> buttuntest
                            </label>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button class="btn btn-primary" onclick="Resmodal_sub()">
                        确认
                    </button>
                    <button class="btn btn-warning" data-dismiss="modal">退出</button>
                </div>
            </div>
        </div><!-- /.modal -->
    </div>
    <script src="../../static/js/pages/role.js"></script>
</div>
</body>
</html>